/*
 * Powered By [fdlm]
 * Web Site: http://www.fdlm.cn
 * Since 2014 - 2015
 */

package com.sjyy.accountcode.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import cn.org.rapid_framework.util.DateConvertUtils;

import java.util.*;

import com.sjyy.accountcode.model.*;
import com.sjyy.accountcode.service.*;
import com.sjyy.accountcode.vo.query.*;

import javacommon.base.*;
import javacommon.util.*;
import javacommon.page.Page;

/**
 * @author cty email:caotianye@fdlm.cn
 * @version 1.0
 * @since 1.0
 */


public class Accountcode extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "Accountcode";
	public static final String ALIAS_ACCOUNT_CODE_ID = "accountCodeId";
	public static final String ALIAS_ACCOUNT = "account";
	public static final String ALIAS_CODE_NUMBER = "codeNumber";
	public static final String ALIAS_CREATE_TIME = "createTime";
	public static final String ALIAS_VALIDATE_TYPE = "validateType";
	
	//date formats
	public static final String FORMAT_CREATE_TIME = DATE_FORMAT;
	
	//columns START
    /** accountCodeId       db_column: account_code_id */	
	
	private java.lang.Integer accountCodeId;
    /** account       db_column: account */	
	@NotBlank @Length(max=11)
	private java.lang.String account;
    /** codeNumber       db_column: code_number */	
	@NotBlank @Length(max=32)
	private java.lang.String codeNumber;
    /** createTime       db_column: create_time */	
	@NotNull 
	private java.util.Date createTime;
    /** validateType       db_column: validate_type */	
	@NotNull 
	private java.lang.Integer validateType;
	//columns END

	public Accountcode(){
	}

	public Accountcode(
		java.lang.Integer accountCodeId
	){
		this.accountCodeId = accountCodeId;
	}

	public void setAccountCodeId(java.lang.Integer value) {
		this.accountCodeId = value;
	}
	
	public java.lang.Integer getAccountCodeId() {
		return this.accountCodeId;
	}
	public void setAccount(java.lang.String value) {
		this.account = value;
	}
	
	public java.lang.String getAccount() {
		return this.account;
	}
	public void setCodeNumber(java.lang.String value) {
		this.codeNumber = value;
	}
	
	public java.lang.String getCodeNumber() {
		return this.codeNumber;
	}
	public String getCreateTimeString() {
		return DateConvertUtils.format(getCreateTime(), FORMAT_CREATE_TIME);
	}
	public void setCreateTimeString(String value) {
		setCreateTime(DateConvertUtils.parse(value, FORMAT_CREATE_TIME,java.util.Date.class));
	}
	
	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}
	
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	public void setValidateType(java.lang.Integer value) {
		this.validateType = value;
	}
	
	public java.lang.Integer getValidateType() {
		return this.validateType;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("AccountCodeId",getAccountCodeId())
			.append("Account",getAccount())
			.append("CodeNumber",getCodeNumber())
			.append("CreateTime",getCreateTime())
			.append("ValidateType",getValidateType())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getAccountCodeId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Accountcode == false) return false;
		if(this == obj) return true;
		Accountcode other = (Accountcode)obj;
		return new EqualsBuilder()
			.append(getAccountCodeId(),other.getAccountCodeId())
			.isEquals();
	}
}

